<template>
	<view class="page flex-col">
		<comHead :title="$t('grzx.hyxq')" :isLeft="true" :isRight="false"></comHead>
		<view class="box_1 flex-col">
			<view class="box_17 flex-col">
				<view class="img">
					<image :src="getImg(userinfo.avatar)" mode="aspectFill"></image>
					<image v-if="userinfo.level>0" :src="getImg(systemLevel[userinfo.level-1].image)"
						mode="aspectFill"></image>
				</view>
				<view class="text-wrapper_1">
					<text class="text_3">{{$t('grzx.dqdj')}}{{userinfo.level}}{{$t('grzx.jlxyj')}} {{(systemLevel[userinfo.level] ? systemLevel[userinfo.level].money : 0) - (systemLevel[userinfo.level-1] ? systemLevel[userinfo.level-1].money : 0)}} {{$t('index.y')}}</text>
					<!-- <text class="text_5">，距离{{userinfo.level+1}}级还需充</text> -->
				</view>
<!-- 				<view class="box_5 flex-col">
					<view class="box_6 flex-col"></view>
					<text>{{userinfo.level}}/{{systemLevel.length}}</text>
				</view> -->
				<view class="list_9 flex-col">
					<view class="list-items_1 flex-row justify-between" v-for="(item, index) in systemLevel" :key="index"
						:style="{ background: item.lanhuBg0 }">
						<view class="group_1 flex-row" :style="{
							'background': 'url('+getImg(item.image)+') 100% no-repeat',
							'background-size': '100% 100%'}">
							<image class="thumbnail_4" referrerpolicy="no-referrer"
								src="https://siha.vxmeng.com/static/my/vip.png" />
							<text class="text_8">{{item.level}}</text>
						</view>
						<view class="section_4 flex-col justify-between">
							<view class="text-wrapper_10 flex-row">
								<text class="text_9">{{item.name}}</text>
								<view class="">
									<text class="text_10">{{$t('index.cz')}}</text>
									<text class="text_11">{{parseInt(item.money)}}</text>
									<text class="text_12">{{$t('index.y')}}</text>
								</view>
							</view>
							<text class="text_13">{{item.blurb}}</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	export default {
		data() {
			return {
				systemLevel:[],
				userinfo:{},
				constants: {},
			};
		},
		onShow() {
			this.getUserinfo()
			this.getSystemLevel()
		},
		methods: {
			async getSystemLevel() {
				const res = await this.$myRequest({
					url: 'api/system/getSystemLevel',
					data: {}
				})
				if (res.code == 1) {
					console.log(res)
					this.systemLevel = res.data
				}
			},
			async getUserinfo() {
				const res = await this.$myRequest({
					url: 'api/user/index',
					data: {}
				})
				if (res.code == 1) {
					console.log(res)
					this.userinfo = res.data
				}
			},

		},
	};
</script>
<style lang="less" scoped>
	.page {


		.box_1 {
			height: calc(100vh - 200rpx);
			width: 750rpx;
			position: relative;
			overflow: auto;

			.box_2 {
				background-color: rgba(216, 216, 216, 0.01);
				width: 750rpx;
				height: 88rpx;

				.text_1 {
					width: 108rpx;
					height: 44rpx;
					overflow-wrap: break-word;
					color: rgba(255, 255, 255, 1);
					font-size: 30rpx;
					letter-spacing: -0.30000001192092896px;
					font-family: Noto Sans SC-Thin-Regular;
					font-weight: normal;
					text-align: center;
					white-space: nowrap;
					line-height: 30rpx;
					margin: 30rpx 0 0 42rpx;
				}

				.thumbnail_1 {
					width: 34rpx;
					height: 22rpx;
					margin: 36rpx 0 0 438rpx;
				}

				.thumbnail_2 {
					width: 32rpx;
					height: 22rpx;
					margin: 36rpx 0 0 10rpx;
				}

				.image_1 {
					width: 50rpx;
					height: 24rpx;
					margin: 36rpx 26rpx 0 10rpx;
				}
			}

			.box_17 {
				// position: absolute;
				width: 750rpx;
				.img {
					position: relative;
					display: flex;
					align-items: center;
					justify-content: center;
					width: 132rpx;
					height: 132rpx;
					margin-left: calc(50% - 61rpx);
					image {
						width: 96rpx;
						height: 96rpx;
						&:nth-child(1){
							border-radius: 50%;
						}
						&:nth-child(2) {
							width: 132rpx;
							height: 132rpx;
							position: absolute;
							top: 0;
							// left: -18rpx;
						}
					}
				}
				.box_18 {
					width: 408rpx;
					height: 52rpx;
					margin: -6rpx 0 0 36rpx;

					.thumbnail_3 {
						width: 14rpx;
						height: 24rpx;
						margin-top: 14rpx;
					}

					.text_2 {
						width: 144rpx;
						height: 52rpx;
						overflow-wrap: break-word;
						color: rgba(216, 216, 216, 1);
						font-size: 36rpx;
						font-family: Source Han Sans-Regular;
						font-weight: normal;
						text-align: center;
						white-space: nowrap;
						line-height: 52rpx;
					}
				}

				.image_2 {
					width: 200rpx;
					height: 200rpx;
					margin: 84rpx 0 0 276rpx;
					border-radius: 50%;
				}

				.text-wrapper_1 {
					width: 100%;
					height: 46rpx;
					text-align: center;
					line-height: 46rpx;
					margin: 52rpx 0 0;
					display: flex;
					flex-wrap: wrap;
					justify-content: center;
					align-items: center;

					.text_3 {
						height: 46rpx;
						color: rgba(255, 255, 255, 1);
						font-size: 32rpx;
					}

					.text_4 {
						height: 46rpx;
						color: rgba(255, 214, 115, 1);
						font-size: 32rpx;
					}

					.text_5 {
						height: 46rpx;
						color: rgba(255, 214, 115, 1);
						font-size: 32rpx;
					}

					.text_6 {
						height: 46rpx;
						color: rgba(255, 214, 115, 1);
						font-size: 32rpx;
					}

					.text_7 {
						height: 46rpx;
						color: rgba(255, 214, 115, 1);
						font-size: 32rpx;
					}
				}

				.box_5 {
					background-color: rgba(51, 51, 51, 1);
					border-radius: 47px;
					height: 26rpx;
					width: 480rpx;
					margin: 32rpx 0 0 136rpx;
					position: relative;
					display: flex;
					justify-content: center;

					.box_6 {
						background-image: linear-gradient(270deg,
								rgba(255, 180, 0, 1) 0,
								rgba(255, 214, 115, 0.547945) 0,
								rgba(255, 255, 255, 0.92) 100%,
								rgba(255, 255, 255, 1) 100%,
								rgba(255, 180, 0, 0.73) 100%);
						border-radius: 47px;
						width: 316rpx;
						height: 26rpx;
					}

					text {
						position: absolute;
						right: 10rpx;
						font-size: 28rpx;
						transform: scale(0.7);
						color: #fff;
					}
				}

				.list_9 {
					width: 670rpx;
					height: 864rpx;
					justify-content: space-between;
					margin: 72rpx 0 0 46rpx;

					.list-items_1 {
						// background-image: linear-gradient(137deg,
						// 		rgba(34, 34, 34, 1) 0,
						// 		rgba(30, 36, 44, 0.65) 100%);
						border-radius: 12px;
						width: 670rpx;
						height: 160rpx;
						margin-bottom: 16rpx;
						display: flex;
						align-items: center;
						
						&:last-child{
							padding-bottom: 50rpx;
							box-sizing: border-box;
						}

						.group_1 {
							position: relative;
							width: 132rpx;
							height: 132rpx;
							margin: 0 0 0 22rpx;
							display: flex;
							align-items: center;
							justify-content: center;

							.text_8 {
								max-width: 50rpx;
								overflow-wrap: break-word;
								color: #FFD673;
								font-size: 40rpx;
								font-family: Source Han Sans CN-Regular;
								font-weight: normal;
								text-align: justify;
								white-space: nowrap;
								// margin-left: 5rpx;
								background: linear-gradient(180deg, #FFB400 0%, rgba(255, 214, 115, 0.5479) 0%, rgba(255, 255, 255, 0.92) 40%, #FFFFFF 57%, rgba(255, 180, 0, 0.73) 100%);
								-webkit-background-clip: text;
								-webkit-text-fill-color: transparent;

							}

							.thumbnail_4 {
								// position: absolute;
								// left: 40rpx;
								// top: 56rpx;
								width: 32rpx;
								height: 32rpx;
							}
						}

						.section_4 {
							width: 476rpx;
							// height: 100rpx;
							margin: 0 22rpx 0 0;
							display: flex;
							justify-content: space-between;

							.text-wrapper_10 {
								width: 100%;
								height: 52rpx;
								display: flex;
								justify-content: space-between;

								.text_9 {
									width: 72rpx;
									height: 46rpx;
									overflow-wrap: break-word;
									color: rgba(216, 216, 216, 1);
									font-size: 32rpx;
									font-family: Source Han Sans-Bold;
									font-weight: 700;
									text-align: justify;
									white-space: nowrap;
									line-height: 46rpx;
									// margin-top: 6rpx;
								}

								.text_10 {
									width: 58rpx;
									// height: 34rpx;
									// overflow-wrap: break-word;
									color: rgba(153, 153, 153, 1);
									font-size: 24rpx;
									font-family: PingFang SC-Regular;
									font-weight: normal;
									text-align: left;
									// white-space: nowrap;
									// line-height: 34rpx;
									// margin: 0 0 0 0;
								}

								.text_11 {
									width: 54rpx;
									// height: 46rpx;
									overflow-wrap: break-word;
									color: rgba(255, 214, 115, 1);
									font-size: 32rpx;
									font-family: Source Han Sans-Regular;
									font-weight: normal;
									text-align: center;
									white-space: nowrap;
									// line-height: 46rpx;
									margin-left: 32rpx;
								}

								.text_12 {
									width: 30rpx;
									// height: 42rpx;
									overflow-wrap: break-word;
									color: rgba(153, 153, 153, 1);
									font-size: 24rpx;
									font-family: PingFang SC-Regular;
									font-weight: normal;
									text-align: right;
									white-space: nowrap;
									// line-height: 34rpx;
									margin: 0 0 0 24rpx;
								}
							}

							.text_13 {
								width: 474rpx;
								// height: 28rpx;
								// overflow-wrap: break-word;
								color: rgba(216, 216, 216, 1);
								font-size: 20rpx;
								font-family: Source Han Sans-Regular;
								font-weight: normal;
								text-align: left;
								// overflow: hidden;
								// white-space: nowrap;
								// line-height: 28rpx;
								margin-top: 10rpx;
							}
						}
					}
				}

				.image_3 {
					width: 280rpx;
					height: 68rpx;
					margin: 46rpx 0 2rpx 236rpx;
				}

				.text_14 {
					position: absolute;
					left: 552rpx;
					top: 456rpx;
					width: 50rpx;
					height: 34rpx;
					overflow-wrap: break-word;
					color: rgba(255, 255, 255, 1);
					font-size: 24rpx;
					font-family: Source Han Sans-Regular;
					font-weight: normal;
					text-align: justify;
					white-space: nowrap;
					line-height: 34rpx;
				}
			}
		}
	}
</style>